///*
// *
// *  Copyright 2015 the original author or authors.
// *
// *  Licensed under the Apache License, Version 2.0 (the "License");
// *  you may not use this file except in compliance with the License.
// *  You may obtain a copy of the License at
// *
// *         http://www.apache.org/licenses/LICENSE-2.0
// *
// *  Unless required by applicable law or agreed to in writing, software
// *  distributed under the License is distributed on an "AS IS" BASIS,
// *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// *  See the License for the specific language governing permissions and
// *  limitations under the License.
// *
// *
// */
//
//package com.hgd.security.evp.swagger.config;
//
//import com.hgd.security.evp.swagger.controller.Test2Controller;
//import com.hgd.security.evp.swagger.controller.TestController;
//import org.springframework.beans.factory.annotation.Qualifier;
//import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
//import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.ComponentScan;
//import org.springframework.context.annotation.Import;
//import org.springframework.context.annotation.Primary;
//import org.springframework.core.annotation.Order;
//import org.springframework.core.env.Environment;
//import org.springframework.stereotype.Component;
//import org.springframework.web.servlet.HandlerMapping;
//import springfox.documentation.spring.web.DocumentationCache;
//import springfox.documentation.spring.web.PropertySourcedRequestMappingHandlerMapping;
//import springfox.documentation.spring.web.SpringfoxWebMvcConfiguration;
//import springfox.documentation.spring.web.json.JacksonModuleRegistrar;
//import springfox.documentation.spring.web.json.JsonSerializer;
//import springfox.documentation.swagger.configuration.SwaggerCommonConfiguration;
//import springfox.documentation.swagger2.configuration.Swagger2JacksonModule;
//import springfox.documentation.swagger2.mappers.ServiceModelToSwagger2Mapper;
//import springfox.documentation.swagger2.web.Swagger2Controller;
//
//@Component
//@Order(Integer.MAX_VALUE - 1)
//@Import({ SpringfoxWebMvcConfiguration.class, SwaggerCommonConfiguration.class })
//@ComponentScan(basePackages = { "springfox.documentation.swagger2.mappers" })
//@ConditionalOnWebApplication
//public class Swagger2DocumentationConfiguration {
//
//    @Bean
//    public Swagger2Controller swagger2Controller(Environment environment, DocumentationCache documentationCache,
//        ServiceModelToSwagger2Mapper mapper, JsonSerializer jsonSerializer) {
//        Swagger2Controller swagger2Controller =
//            new Swagger2Controller(environment, documentationCache, mapper, jsonSerializer);
//        return swagger2Controller;
//    }
//
//    @Bean
//    public Test2Controller test2Controller(){
//        Test2Controller testController = new Test2Controller();
//        return testController;
//    }
//
//    @Bean
//    @Order(Integer.MAX_VALUE - 2)
//    public HandlerMapping hgd11SwaggerRequestMappingHandlerMapping(Environment environment,
//        @Qualifier("swagger2Controller") Swagger2Controller swagger2Controller) {
//        Hgd11SwaggerRequestMappingHandlerMapping propertySourcedRequestMappingHandlerMapping =
//            new Hgd11SwaggerRequestMappingHandlerMapping(environment, swagger2Controller);
//        return propertySourcedRequestMappingHandlerMapping;
//    }
//}
